package com.chenxin.dubbo.controller;

import com.chenxin.dubbo.entity.User;
import com.chenxin.dubbo.service.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserConsumer {

    @Reference
    private UserService userService;

    @RequestMapping("getUser")
    public List<User> getUser(){
        return userService.getUser();
    }
}
